package com.example.Bontroller2;

import android.app.Application;
import android.content.Context;
import android.os.Handler;
import android.preference.PreferenceManager;

public class BontrollerMtApp extends Application{

	  public static int connectionMethod = 0;
	  private static Context context;
	  public static boolean isCheckPassword;
	  public static String localIP;
	  public static int port;
	  public int BT = 2;
	  public int WIFI = 1;
	  public boolean isNewBrowserLine;
	  public Handler mHandler;
/*	  public BluetoothMouseService myBtChatService;*/
	  public String nextLine;

	  public static Context getAppContext()
	  {
	    return context;
	  }

	  public static int getConnectionMethod()
	  {
	    return connectionMethod;
	  }

	  public static int getPort()
	  {
	    return port;
	  }

	  public Handler getHandler()
	  {
	    return this.mHandler;
	  }

	  public String getLine()
	  {
	    return this.nextLine;
	  }

/*	  public BluetoothMouseService getState()
	  {
	    return this.myBtChatService;
	  }*/

	  public void onCreate()
	  {
	    super.onCreate();
	    context = getApplicationContext();
	    setPort();
	  }

	  public void setConnectionMethod(int paramInt)
	  {
	    connectionMethod = paramInt;
	  }

	  public void setHandler(Handler paramHandler)
	  {
	    this.mHandler = paramHandler;
	  }

	  public void setNewLine(String paramString)
	  {
	    this.nextLine = paramString;
	  }

	  public void setPort()
	  {
	    port = Integer.parseInt(PreferenceManager.getDefaultSharedPreferences(getAppContext()).getString("port_number", "8888"));
	  }

/*	  public void setState(BluetoothMouseService paramAMBluetoothService)
	  {
	    this.myBtChatService = paramAMBluetoothService;
	  }*/
	
}
